<?php
declare (strict_types = 1);

namespace app\common\model;

use think\Model;
use think\response\Json;

/**
 * @mixin \think\Model
 */
class ProPlace extends Base
{

    protected $name = 'pro_place';

    public static function ProPlaceSelect()
    {
        parent::startTrans();
        try {
            $find = parent::where(['is_del'=>0])->order('sort asc')->field('id,title')->select()->toArray();
            foreach($find as $k=>$v){
                $data[$v['id']]=$v['title'];
            }
            return  $data;
        } catch (\Exception $e) {
            return ['code' => -1, 'msg' => $e->getMessage()];
        }
    }

}
